﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Model
{
    public class BArticle
    {
        /// <summary>
        /// 文章ID
        /// </summary>
        //[JsonIgnore]
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id                   {get;set; }
        /// <summary>
        /// 类别ID
        /// </summary>
        public int SortID                {get;set; }
        /// <summary>
        /// 标签ID
        /// </summary>
        public string TagID { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string ArticleTitle          {get;set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string ArticleContent        {get;set; }
        /// <summary>
        /// 封面
        /// </summary>
        public string ArticleCover          {get;set; }
        /// <summary>
        /// 是否发布
        /// </summary>
        public int IsPublish             {get;set; }
        /// <summary>
        /// 浏览量
        /// </summary>
        public int ViewsCount            {get;set; }
        /// <summary>
        /// 评论数
        /// </summary>
        public int CommentsCount         {get;set;}
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        private DateTime _updatedAt = DateTime.Now;
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdatedAt { get { return _updatedAt; } set { _updatedAt = value; } }
        /// <summary>
        /// 摘要
        /// </summary>
        public string ArticleSummary        {get;set; }
        /// <summary>
        /// 是否顶置
        /// </summary>
        public int IsTop                 {get;set; }
        /// <summary>
        /// 是否火热
        /// </summary>
        public int IsHot                 {get;set; }
        /// <summary>
        /// 是否推荐
        /// </summary>
        public int IsRecommend           {get;set; }
        /// <summary>
        /// 转载地址
        /// </summary>
        public string Reprint               {get;set; }
        /// <summary>
        /// 编辑器类型
        /// </summary>
        public string EditType { get; set; }

    }
}
